
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<span style="font-size:18px;">
<html>
<head>
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <link rel="stylesheet" type="text/css" href="weddingPhotography/css/bootstrap.min.css" />
    <link rel="stylesheet" type="text/css" href="weddingPhotography/css/commonly-used-show.css" />
    <script type="text/javascript" src="weddingPhotography/js/jquery.min.js"></script>
    <script type="text/javascript" src="weddingPhotography/js/bootstrap.js" ></script>

    <title>最新资讯</title>

    <style>
        .newsdiv{
            border: 1px solid black;
            margin: 30px auto;
            height: 200px;
            padding: 40px;
            border-radius: 5px;
        }
    </style>
</head>

<body class="mybody">

<jsp:include page="theTopMenuUser.jsp" />

<div class="container">
     <h3 style="text-align: center">结婚资讯</h3>
     <hr style="filter: alpha(opacity=100,finishopacity=0,style=3)" width="100%" color="#6f5999" size="3"/>
    <div id="personal_user" style="margin-left: 10%; margin-right: 10%">

         <c:forEach items="${allnews}" var="news" varStatus="xh">
             <div class="newsdiv">
                <a href="${pageContext.request.contextPath}/advisoryDetails?id=${news.id}" style="float: left">
                    <img src="${pageContext.request.contextPath}${news.newsImage}" width="100px" height="100px">
                </a>
                <div style="float: left; margin-left: 50px;">
                    <a href="${pageContext.request.contextPath}/advisoryDetails?id=${news.id}" >
                        <span>${news.newsTitle}</span>
                    </a>
                    <p style="margin-top: 20px">
                        <span>${news.createTime}</span>
                    </p>
                </div>
            </div>
         </c:forEach>

        </div>

</div>


<script type="text/javascript">
    var userdt = JSON.parse(sessionStorage.getItem("user"));
    if (userdt.result.userName != null){
        $("#usname").text(userdt.result.userName);
    }else {
        $("#usname").text(userdt.result.userLoginName);
    }

</script>

</body>
</html>
</span>